<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
	public function _initApplication() {
		// Start session
		require_once 'Zend/Session.php';
		Zend_Session::start();
		
		// Layout
		require_once 'Zend/Layout.php';
		Zend_Layout::startMvc();
		
		// UTF-8 encoding
		$view = Zend_Layout::getMvcInstance()->getView();
		$view->setEncoding('UTF-8');
		$view->doctype('XHTML1_TRANSITIONAL');

		// phpBB options
		$phpbbOptions = $this->_application->getOption('phpBB');
		Zend_Registry::set('phpBB', $phpbbOptions);
		define('PHPBB_URL', $phpbbOptions['url']);
	}
}

